Skip to content

Add JVM lazy clipboard verification tests#3928

Merged
guiyanakuang merged 1 commit intomainfrom
test/issue-3927-jvm-lazy-clipboard-verification
Feb 23, 2026
Merged

Add JVM lazy clipboard verification tests#3928
guiyanakuang merged 1 commit intomainfrom
test/issue-3927-jvm-lazy-clipboard-verification

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

@guiyanakuang guiyanakuang commented Feb 23, 2026

Closes #3927

Summary

  • Add JvmLazyClipboardTest with 12 tests proving JVM clipboard getTransferData() eagerness varies by platform
  • macOS/Windows: 4 tests each asserting getTransferData() is called eagerly during setContents()
  • Linux: 4 tests asserting lazy behavior (deferred until getData())
  • Tests organized by OS using JUnit 5 @Nested + @EnabledOnOs — only the current platform's tests run
  • @EnabledIf("isNotHeadless") skips all tests in headless CI environments to avoid HeadlessException

Test plan

  • ./gradlew ktlintFormat passes
  • ./gradlew app:desktopTest --tests "com.crosspaste.paste.JvmLazyClipboardTest" — macOS: 4 passed, 8 skipped
  • Verify Windows tests pass on Windows machine
  • Verify Linux tests pass on Linux with display
  • Verify all tests skip cleanly in headless CI

@guiyanakuang guiyanakuang merged commit 43d0f5c into main Feb 23, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the test/issue-3927-jvm-lazy-clipboard-verification branch February 23, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JVM lazy clipboard verification tests for platform behavior documentation

1 participant